|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.ObjectCounter
public class Counter
Provide a counter for a participant in the simulation. This includes an identifying string and a count of how many participants of this type currently exist within the simulation.
| Constructor Summary | |
|---|---|
Counter(String name)
Provide a name for one of the simulation types. |
|
| Method Summary | |
|---|---|
int |
getCount()
|
String |
getName()
|
void |
increment()
Increment the current count by one. |
void |
reset()
Reset the current count to zero. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Counter(String name)
name - A name, e.g. "Fox".| Method Detail |
|---|
public int getCount()
public String getName()
public void increment()
public void reset()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||